#ifndef VOL_BREAKPAD_H__
#define VOL_BREAKPAD_H__

namespace VolExceptionHandler
{
  enum HandlerType {
    HANDLER_NONE = 0,
    HANDLER_EXCEPTION = 1 << 0,          // SetUnhandledExceptionFilter
    HANDLER_INVALID_PARAMETER = 1 << 1,  // _set_invalid_parameter_handler
    HANDLER_PURECALL = 1 << 2,           // _set_purecall_handler
    HANDLER_ALL = HANDLER_EXCEPTION |
                  HANDLER_INVALID_PARAMETER |
                  HANDLER_PURECALL
  };
}

#ifndef _DEBUG
#include "client\windows\handler\exception_handler.h"

using namespace google_breakpad;

class CVolExceptionHandler
{
public:
	void Initialize(const wstring& dump_path, ExceptionHandler::MinidumpCallback cb, void* volcb, int handler_types);
	static CVolExceptionHandler* instance();
	~CVolExceptionHandler() { if (m_handler != NULL) delete m_handler; }

private:
	ExceptionHandler* m_handler;
	CVolExceptionHandler() { m_handler = NULL; }
};
#endif
#endif